function TableSelection(id)
{
	this.selection = null;
	this.bgColor = null;
	this.tagId = id;
	this.makeSelection = makeSelection;
}

function makeSelection(elem, value)
{
	if(this.selection == elem)
		return;
	document.getElementById(this.tagId).value = value;
	if(this.selection != null)
		this.selection.bgColor = this.bgColor;
	this.selection = elem;
	this.bgColor = elem.bgColor;
	elem.bgColor = '#C9CC99';
}
